package com.czp.infosharingplatformapp.repository;

import com.czp.infosharingplatformapp.model.Comment;
import com.czp.infosharingplatformapp.model.Post;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CommentRepository extends JpaRepository<Comment, Long> {
    List<Comment> findByPost(Post post); // 根据帖子查询所有评论
}